<%@ page language='java' contentType='text/html; charset=UTF-8'  pageEncoding='UTF-8'%>

    <%
		String base = request.getContextPath();
		request.setAttribute("base", base);
	%>

    <script src="${base}/resources/js/jquery.bs_pagination.min.js" ></script>
    <script src="${base}/resources/js/bs_pagination_en.js"></script>
    
    <script type="text/javascript">
    function pagination(page,dom,show,change,datalist,kind) {
        var pages = page.pages;
        var pageNum = page.pageNum;
        var pageSize = page.pageSize;
        var totalRows = page.total;
        $(dom).bs_pagination({
          currentPage: pageNum,     
          totalPages: pages,      
          totalRows :totalRows,
          visiblePageLinks: 5,
          rowsPerPage: pageSize,     
          showGoToPage: false,
          showRowsPerPage: false,
          showRowsInfo: false,
          showRowsDefaultInfo: false,
          navListContainerClass: "col-xs-12 col-sm-12 col-md-12",
          containerClass: "",
          onLoad: function(event, data) {
         	  	show(datalist,kind);
          },
          onChangePage: function(event, data) {
          	if(data.currentPage != pageNum) {
          		//第二个参数表示在分页
          		change(data.currentPage,true);
          	}
          }
      });
  }
    
    </script>
